package com.xckj.cycling.framework.net;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import okhttp3.MediaType;
import okhttp3.ResponseBody;
import okio.Buffer;
import okio.BufferedSource;

/**
 * @Author: ChenYao
 * @Date: 2023/2/26 19:05
 */
public class EmptyResponseBody extends ResponseBody {
    @Override
    public long contentLength() {
        return 0;
    }

    @Nullable
    @Override
    public MediaType contentType() {
        return MediaType.parse("text/plain");
    }

    @NonNull
    @Override
    public BufferedSource source() {
        return new Buffer();
    }
}
